<%@page language="java" pageEncoding="UTF-8" %>

<%@include file="/template/common/include/constant.jsp" %>

<%@include file="/template/top.jsp" %>
<script type="text/javascript" src="${pageContext.request.contextPath}/template/js/gftuserfunc.js"></script>
<body>
<div class="main1">用户信息&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;邮件信息&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="${path}/ta/ol.x?op=list" target="_blank">日志记录</a></div>
<form method="post" action="${pageContext.request.contextPath}/ta/nu.x">
    <input type="hidden" name="op" value="list"/>

    <div class="main_search">
    
    	昵称:
          <input type="text" name="f(name)" value="${fmap.name}"/>
        ID:
          <input type="text" name="f(id)" value="${fmap.id}"/>
         
        排序:
        <select name="f(sort)">
            <option value="1">来访先后</option>
            <option value="2" <c:if test='${fmap.sort == "2"}'>selected</c:if>>来信先后</option>
            <option value="3" <c:if test='${fmap.sort == "3"}'>selected</c:if>>发信先后</option>
        </select>
        <input name="Submit" type="submit" class="search" value="搜索"/>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <input name="Submit" type="button" onClick="window.open('${path}/ta/mailinfo.x?op=openPostPage','','Width=500,Height=500');" class="btn_Submit" value="发送邮件"/>
        
        &nbsp;&nbsp;&nbsp;&nbsp;
        <input name="Submit" type="button"
               onClick="openPrintOL()"
               class="btn_Submit" value="添加日志"/>
        <script language="javascript">
            function openPrintOL() {
                window.open('${path}/ta/ol.x?op=add', '', 'Width=500,Height=500');
            }
        </script>
        
    </div>
</form>
<div class="main_list">
    <div class="main_list_left">用户列表 </div>
    <div class="main_edit">
    </div>
</div>
<form method="post" action="${pageContext.request.contextPath}/ta/nu.x" id="listFrm" d_op="list">
    <input type="hidden" id="id_op" name="op" value="list"/>
    <input type="hidden" id="id_u_id" name="u.id"/>
    ${sys_searchparemeter}
    <div class="list_div">
        <table>
            <tr>
                <th width="10"><input type="checkbox" onClick="checkByName('ids',this.checked);"/></th>
                <th width="150">头像</th>
                <th width="350">信息</th>
                <th width="150">状态</th>
                <th>操作</th>
            </tr>
            <c:forEach items="${pageBean.retList}" var="row">
                <tr>
                    <td>
                        <input type="checkbox" name="ids" value="${row.id}"/>
                    </td>
                    <td><a target="_blank" href="${row.url}"><img src="${row.img}" hspace="0" vspace="0"></a></td>
                    <td>
                        <div>${row.name}</div>
                        <div>${row.other}</div>
                        <div>记录时间：${row.createDate}</div>
                    </td>
                    <td>
                            <c:if test='${row.nType == 1}'>
                                未发邮件
                            </c:if>
                            <c:if test='${row.nType == 2}'>
                                <span style="color:#F00">以发邮件</span>
                            </c:if>
                            <c:if test='${row.nType == 3}'>
                                <span style="color:#F00">放弃</span>
                            </c:if>
                    </td>
                    <td>
                        <div>
                        <br>&nbsp;&nbsp;&nbsp;&nbsp;
                            <a target="_blank" href="${row.url}">查看主页</a>
                            <br>&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="#" onClick="window.open('${path}/ta/mailinfo.x?op=pastMail&uid=${row.uId}','','Width=400,Height=500');return false;">过往邮件</a>
                            <br>&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="#" onClick="window.open('${path}/ta/mailinfo.x?op=openPostPage&uid=${row.uId}','','Width=500,Height=500');return false;">发送邮件</a>
                            <br>&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="#" onClick="window.open('${path}/ta/ol.x?op=add&ol.userId=${row.uId}', '', 'Width=500,Height=500');return false;">添加日志</a>
                        </div>
                    </td>
                </tr>
            </c:forEach>
        </table>
    </div>
    <div class="main_page">
        <%@include file="/template/common/include/pagefooter.jsp" %>
    </div>
</form>
</body>